package com.zerous.framework.ui;
import com.zerous.framework.*;

public class CheckBox extends Button
{
	boolean state = false;
	public CheckBox(double x, double y, double w, double h)
	{
		super(x, y, w, h);
		onclick = new UIBase.OnClick() { public void click() {
				state = !state;
		}};
	}
	
	public boolean isCheckin()
	{
		return state;
	}
	
	@Override
	public void draw()
	{
		Zex.graphics.drawRect(p.getX(), p.getY(), s.getX(), s.getY(), state ? dc : oc);

		Zex.graphics.drawText(touch + " ", p.getX(), p.getY());
		
	}
}
